home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_ImageMagick.idb / usr / freeware / include / magick / magick.h.z / magick.h
Encoding:
C/C++ Source or Header  |  1999-01-26  |  5.4 KB  |  222 lines

  1. /*
  2.   ImageMagick Application Programming Interface declarations.
  3. */
  4. #ifndef _MAGICK_H
  5. #define _MAGICK_H
  6.  
  7. #if defined(__cplusplus) || defined(c_plusplus)
  8. extern "C" {
  9. #endif
  10.  
  11. #if defined(__hpux)
  12. #define _HPUX_SOURCE  1
  13. #endif
  14.  
  15. #if defined(vms)
  16. #define _POSIX_C_SOURCE  1
  17. #endif
  18.  
  19. /*
  20.   System include declarations.
  21. */
  22. #include <stdio.h>
  23. #include <stdlib.h>
  24. #if defined(_VISUALC_)
  25. #include <direct.h>
  26. #else
  27. #include <unistd.h>
  28. #endif
  29. #include <ctype.h>
  30. #include <string.h>
  31. #include <signal.h>
  32. #include <time.h>
  33. #include <math.h>
  34. #include <assert.h>
  35. #if !defined(macintosh)
  36. #include <sys/types.h>
  37. #include <sys/stat.h>
  38. #else
  39. #include <SIOUX.h>
  40. #include <console.h>
  41. #include <unix.h>
  42. #include <types.h>
  43. #include <stat.h>
  44. #endif
  45.  
  46. /*
  47.   ImageMagick include declarations.
  48. */
  49. #if defined(__cplusplus) || defined(c_plusplus)
  50. #define class  c_class
  51. #endif
  52.  
  53. #if !defined(WIN32)
  54. #define Export
  55. #else
  56. #define Export  __declspec(dllexport)
  57. #pragma warning( disable : 4018 )
  58. #pragma warning( disable : 4244 )
  59. #endif
  60.  
  61. #undef index
  62.  
  63. #if defined(HAVE_CONFIG_H)
  64. #include "config.h"
  65. #endif
  66. #include "delegates.h"
  67. #include "image.h"
  68. #include "gems.h"
  69. #include "compress.h"
  70. #include "utility.h"
  71. #include "monitor.h"
  72. #include "error.h"
  73. #include "X.h"
  74. #include "widget.h"
  75. #include "PreRvIcccm.h"
  76. #include "memory.h"
  77.  
  78. /*
  79.   Define declarations.
  80. */
  81. #define AbsoluteValue(x)  ((x) < 0 ? -(x) : (x))
  82. #define DownShift(x) (((int) ((x)+(1L << 13))) >> 14)
  83. #define Extent(string)  ((int) strlen(string))
  84. #define False  0
  85. #define Max(x,y)  (((x) > (y)) ? (x) : (y))
  86. #define Min(x,y)  (((x) < (y)) ? (x) : (y))
  87. #if !defined(M_PI)
  88. #define M_PI  3.14159265358979323846
  89. #endif
  90. #define QuantumTick(i,image) \
  91.   (((i+1) == image->packets) || ((i % image->rows) == 0))
  92. #define Swap(x,y) ((x)^=(y), (y)^=(x), (x)^=(y))
  93. #if !defined(STDIN_FILENO)
  94. #define STDIN_FILENO  0
  95. #endif
  96. #define True  1
  97. #define UpShift(x) ((int) (x) << 14)
  98. #define UpShifted(x) ((int) ((x)*(1L << 14)+0.5))
  99.  
  100. /*
  101.   Review these definitions and change them to suit your local requirements.
  102. */
  103. #define DefaultDisplayGamma  "2.2"
  104. #define DefaultFont  "-adobe-helvetica-medium-r-*-*-14-*-*-*-*-*-iso8859-*"
  105. #define DefaultImageQuality  "75"
  106. #define DefaultInterlace  NoInterlace
  107. #define DefaultPointSize  "12"
  108. #define DefaultPreviewGeometry  "204x204+10+10"
  109. #define DefaultPreviewMatte  "#dfdfdf"
  110. #define DefaultPreviewPageGeometry  "3x3"
  111. #define DefaultTextBackground  "#ffffff"
  112. #define DefaultTextForeground  "#000000"
  113. #define DefaultTileBackground  "#696e7e"
  114. #define DefaultTileForeground  "#000000"
  115. #define DefaultTileFrame  "15x15+3+3"
  116. #define DefaultTileGeometry  "120x120+10+10>"
  117. #define DefaultTileLabel  "%f"
  118. #define DefaultTileMatte  "#bdbdbd"
  119. #define DefaultTilePageGeometry  "6x4"
  120. #define DefaultThumbnailGeometry  "106x106+0+0>"
  121. #define DocumentationURL  \
  122.   "http://www.wizards.dupont.com/cristy/ImageMagick.html"
  123. #define PostscriptColorDevice  "pnmraw"
  124. #define PostscriptMonoDevice  "pbmraw"
  125. #define ReadBinaryType  "rb"
  126. #define TemporaryDirectory  "/tmp"
  127. #define UndoCache  "16"
  128. #define WriteBinaryType  "wb"
  129. /*
  130.   Review these machine specific definitions.
  131. */
  132. #if !defined(vms) && !defined(macintosh) && !defined(WIN32)
  133. #define ApplicationDefaults  "/usr/X11R6/lib/X11/app-defaults/"
  134. #define EditorOptions  " -title \"Edit Image Comment\" -e vi"
  135. #define Exit  exit
  136. #define LaunchFormat  "psd"
  137. #define PreferencesDefaults  "~/."
  138. #define PrinterFormat  "ps"
  139. #define ReadCommandlLine(argc,argv)
  140. #if !defined(RGBColorDatabase)
  141. #define RGBColorDatabase  "/usr/X11R6/lib/X11/rgb.txt"
  142. #endif
  143. #else
  144. #if defined(vms)
  145. #define ApplicationDefaults  "decw$system_defaults:"
  146. #define EditorOptions  ""
  147. #define Exit(errno)  errno ? exit(-1) : exit(0)
  148. #define LaunchFormat  "psd"
  149. #define PreferencesDefaults  "decw$user_defaults:"
  150. #define PrinterFormat  "ps"
  151. #define ReadCommandlLine(argc,argv)
  152. #if !defined(RGBColorDatabase)
  153. #define RGBColorDatabase  "sys$common:[sysmgr]decw$rgb.dat"
  154. #endif
  155. #endif
  156. #if defined(macintosh)
  157. #define ApplicationDefaults  "/usr/lib/X11/app-defaults/"
  158. #define EditorOptions ""
  159. #define HasJPEG
  160. #define HasLZW
  161. #define HasPNG
  162. #define HasTIFF
  163. #define HasZLIB
  164. #define HasMPEG
  165. #define HasTTF
  166. #define LaunchFormat  "psd"
  167. #define PreferencesDefaults  "~/."
  168. #define PrinterFormat  "ps"
  169. #define ReadCommandlLine(argc,argv)  argc=ccommand(argv); puts(Version);
  170. #if !defined(RGBColorDatabase)
  171. #define RGBColorDatabase  "../xlib/lib/X11/rgb.txt"
  172. #endif
  173. #endif
  174. #if defined(WIN32)
  175. #define ApplicationDefaults  "/usr/lib/X11/app-defaults/"
  176. #define EditorOptions ""
  177. #define HasJBIG
  178. #define HasJPEG
  179. #define HasLZW
  180. #define HasMPEG
  181. #define HasPNG
  182. #define HasTIFF
  183. #define HasTTF
  184. #define HasZLIB
  185. #define LaunchFormat  "bmp"
  186. #undef isatty
  187. #define isatty(filedes)  1
  188. #define PreferencesDefaults  "~/."
  189. #define PrinterFormat  "pcl"
  190. #define ReadCommandlLine(argc,argv)
  191. #if !defined(RGBColorDatabase)
  192. #define RGBColorDatabase  "../xlib/lib/X11/rgb.txt"
  193. #endif
  194. #undef sleep
  195. #define sleep(seconds)  Sleep(seconds*1000)
  196. #endif
  197. #endif
  198.  
  199. /*
  200.   Page geometries:
  201. */
  202. #define PCLPageGeometry  "612x792>"
  203. #define PCLDensityGeometry  "75x75"
  204. #define PDFPageGeometry  "612x792>"
  205. #define PSDensityGeometry  "72x72"
  206. #define PSPageGeometry  "612x792>"
  207. #define TextPageGeometry  "612x792+43+43"
  208. /*
  209.   3D effects.
  210. */
  211. #define AccentuateModulate  UpScale(80)
  212. #define HighlightModulate  UpScale(125)
  213. #define ShadowModulate  UpScale(135)
  214. #define DepthModulate  UpScale(185)
  215. #define TroughModulate  UpScale(110)
  216.  
  217. #if defined(__cplusplus) || defined(c_plusplus)
  218. }
  219. #endif
  220.  
  221. #endif
  222.